(function() {

  $(document).ready(function() {
    var adminCommentRoutes, adminResponseRoutes, adminauthorRoutes, admincontentRoutes, adminctagoryRoutes, adminsecurityRoutes, adminuserRoutes, bookRoutes;
    Messages.WriteMessage("Initializing site.");
    adminsecurityRoutes = new AdminSecurityRoutes();
    admincontentRoutes = new AdminContentRoutes();
    adminuserRoutes = new AdminUserRoutes();
    adminauthorRoutes = new AdminAuthorRoutes();
    adminctagoryRoutes = new AdminCategoryRoutes();
    bookRoutes = new AdminBookRoutes();
    adminResponseRoutes = new AdminResponseRoutes();
    adminCommentRoutes = new AdminCommentRoutes();
    window.UrlPrefix = "/myLibrary/Admin/";
    window.html5history = !!(history.pushState && history.state !== void 0);
    Backbone.history.start({
      pushState: true,
      root: window.UrlPrefix
    });
    $(document).on("click", "a:not(.no-link)", function(e) {
      var url;
      e.preventDefault();
      if ($(this).attr("href")) {
        Loading.Start();
        url = $(this).attr("href").replace(window.UrlPrefix, '');
        return Backbone.history.navigate(url, {
          trigger: true
        });
      }
    });
    $.ajaxSetup({
      cache: false
    });
    return Messages.WriteMessage("Site initialized successfully.");
  });

}).call(this);
